package com.example.pojo;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import java.io.Serializable;

import lombok.Data;

/**
 * @TableName biz_partsrepertory
 */
@TableName(value = "biz_partsrepertory")
@Data
public class BizPartsrepertory implements Serializable {
    /**
     *
     */
    @TableId(type = IdType.AUTO)
    private Integer partsrepid;

    /**
     *
     */
    private Integer partsid;

    /**
     *
     */
    private Integer partsreqcount;

    @TableField(exist = false)
    private BizParts bizParts;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        BizPartsrepertory other = (BizPartsrepertory) that;
        return (this.getPartsrepid() == null ? other.getPartsrepid() == null : this.getPartsrepid().equals(other.getPartsrepid()))
                && (this.getPartsid() == null ? other.getPartsid() == null : this.getPartsid().equals(other.getPartsid()))
                && (this.getPartsreqcount() == null ? other.getPartsreqcount() == null : this.getPartsreqcount().equals(other.getPartsreqcount()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getPartsrepid() == null) ? 0 : getPartsrepid().hashCode());
        result = prime * result + ((getPartsid() == null) ? 0 : getPartsid().hashCode());
        result = prime * result + ((getPartsreqcount() == null) ? 0 : getPartsreqcount().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", partsrepid=").append(partsrepid);
        sb.append(", partsid=").append(partsid);
        sb.append(", partsreqcount=").append(partsreqcount);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}